package com.zoweunion.mechanic.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zoweunion.mechanic.entity.DeptEntity;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * 部门表(新)
 * 
 * @author xp
 * @email 17688825585@163.com
 * @date 2020-09-24 14:57:06
 */
@Component
public interface DeptDao  extends BaseMapper<DeptEntity>{

    List<DeptEntity> queryPage(@Param("map") Map<String, Object> map);

    List<Map<String, Object>> serverListGroupPro(@Param("map") Map<String, Object> params);

    List<Map<String, Object>> selectByPro(@Param("sid")String sid, @Param("code")int province_code);

    void insertUser(@Param("params") DeptEntity params);

    void insertRelation(@Param("params")DeptEntity params);

    int selectByUser(@Param("mobilePhone")String mobilePhone);

    List<Map<String, Object>>  userList(@Param("params")Map<String, Object> map);

    void updateUser(@Param("params")DeptEntity params);

    int updateUserRelation(@Param("params")DeptEntity params);

    void updateUserDelete(@Param("params")DeptEntity params);

    void updateUserRelationDelete(@Param("params")DeptEntity params);

    void updateDelete(@Param("id")Long id);

    int selectUserCount(@Param("id")Long id);

    void deleteUserServer(@Param("userId")String userId);

    void insertUserServer(@Param("userServerRalationId")String userServerRalationId, @Param("userId")String userId, @Param("sid")String item);

    List<Map<String,Object>> selectServer(@Param("userId")String userId);

    List<Map<String,Object>> selectByServer(@Param("userId")String userId,@Param("code")int province_code);

    List<Map<String,Object>> getManagedServerList(@Param("reqMap") Map<String, Object> paramMap);
}
